<!--
 * @Description: 齐套料-工艺配套
 * @Autor: 曹敬涛
 * @Date: 2021-09-16 15:45:18
 * @LastEditors: 商晓彬
 * @LastEditTime: 2022-02-16 15:36:04
-->
<div>
    <div class="m-subheader">
        <div class="row align-items-center">
            <div class="mr-auto col-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>实物配套</span>
                </h3>
            </div>
        </div>
    </div>

    <div class="ex-management">
        <div class="ui-g" style="height: 100%;">
            <div class="ui-g-4" style="border-right: 10px solid #eee;height: 780px;overflow: auto;">
                <!-- 查询框 -->
                <div class="query-box">
                    <span class="ui-float-label quality-dept">
                        <span class="text">型号</span>
                        <p-dropdown name="model" #modelSelect="ngModel" [options]="modelList"
                            [(ngModel)]="queryInfo.model" [filter]="true" dataKey="value" filterBy="label"
                            [optionLabel]="'label'" placeholder="请选择" required (onChange)="getLotNoList($event)">
                        </p-dropdown>
                    </span>
                    <span class="ui-float-label quality-dept">
                        <span class="text">发次</span>
                        <p-dropdown name="lotNo" #lotNoSelect="ngModel" [options]="lotNoList"
                            [(ngModel)]="queryInfo.lotNo" dataKey="value" [optionLabel]="'label'" placeholder="请选择">
                        </p-dropdown>

                    </span>

                    <p-button class="add-btn" (click)="getDesigenTree()" label="查询"></p-button>

                </div>
                <div>
                    <p-tree *ngIf="files2.length !=0" [value]="files2" selectionMode="single"
                        [(selection)]="selectedFiles1" (onNodeSelect)="nodeSelect($event)" [style]="{ height: '90%' }">
                        <ng-template let-node pTemplate="default">
                            <img class="imgcontent" src="../../../assets/common/images/三级图标.png"
                                *ngIf="node.nodeLevel==8||node.nodeLevel==9" width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/0.png"
                                *ngIf="node.nodeLevel==undefind" width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/1.png" *ngIf="node.nodeLevel==1"
                                width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/2.png" *ngIf="node.nodeLevel==2"
                                width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/3.png" *ngIf="node.nodeLevel==3"
                                width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/4.png" *ngIf="node.nodeLevel==4"
                                width="20" height="20" />
                            <img class="imgcontent" src="../../../assets/common/images/5.png" *ngIf="node.nodeLevel==5"
                                width="20" height="20" />
                            <span
                                *ngIf="node.key==-1">{{node.model}}-{{node.lotNo}}-{{node.nodeDrawingNo}}-{{node.nodeName}}-{{node.stageSign}}</span>
                            <span *ngIf="node.key!=-1">{{node.nodeDrawingNo}}-{{node.nodeName}}</span>
                            <span class="ptagisRelation"
                                *ngIf="node.isRelation==1&&node.isExport!=1">{{node.isRelation==1?'已关联':''}}</span>
                            <span class="ptagisExport" *ngIf="node.isExport==1">{{node.isExport==1?'已导出':''}}</span>
                        </ng-template>
                    </p-tree>
                    <div *ngIf="files2.length ==0">请先选择型号和发次</div>
                </div>
            </div>
            <div class="ui-g-8" style="height: 780px;overflow: auto;">
                <div>
                    <!-- <p-button (click)="selectedCars3All()" label="全选物料"></p-button> -->
                    <p-button *ngIf="'Pages.PhysicalMatching.Matching' | permission" (click)="handelEv()" label="配套">
                    </p-button>
                    <p-button *ngIf="'Pages.PhysicalMatching.CancelMatching' | permission" class="add-btn" (click)="taskIssue()" label="取消配套">
                    </p-button>
                    <span *ngIf="selectedFiles1">
                        <p-button *ngIf="selectedFiles1.isRelation == 1 && ('Pages.PhysicalMatching.ExportTable' | permission)" class="add-btn" (click)="handManage()" label="导出配套表">
                        </p-button>
                    </span>
                </div>
                <!-- 列表 -->
                <div>
                    <div class="m-portlet m-portlet--mobile">
                        <div class="primeng-datatable-container"
                            style="margin-top: 10px;width : 100%;min-height: 350px;">
                            <p-treeTable [value]="tableList.matingTreeGridList" [scrollable]="true" scrollHeight="350px"
                                [(selection)]="selectRow" [scrollable]="true">
                                <ng-template pTemplate="header" let-rowData="rowData">
                                    <tr>
                                        <th style="width: 150px;position:sticky;left:0;z-index:1;">操作</th>

                                        <th style="width: 80px;position:sticky;left:150px;z-index:1;">
                                            <!-- <p-treeTableHeaderCheckbox></p-treeTableHeaderCheckbox> -->
                                            层级
                                        </th>
                                        <th style="width: 80px;position:sticky;left:230px;z-index:1;">
                                            <p-treeTableHeaderCheckbox></p-treeTableHeaderCheckbox>
                                        </th>
                                        <th style="width: 110px;position:sticky;left:310px;z-index:1;">物料图号</th>
                                        <th style="width: 110px;position:sticky;left:420px;z-index:1;">物料名称</th>
                                        <th style="width: 110px">规格</th>
                                        <th style="width: 110px">物料层级</th>
                                        <th style="width: 110px">物料类别</th>
                                        <th style="width: 110px">年代号</th>
                                        <th style="width: 110px">单位</th>
                                        <th style="width: 110px">工艺用量</th>
                                        <th style="width: 130px">芯级预配套数量</th>
                                        <th style="width: 130px">可用预配套数量</th>
                                        <th style="width: 110px">配套数量</th>
                                        <th style="width: 110px">缺料数量</th>
                                        <th style="width: 110px">出库数量</th>
                                        <th style="width: 110px">配套状态</th>
                                        <th style="width: 110px">配套人</th>
                                        <th style="width: 110px">配套时间</th>
                                        <th style="width: 110px">预配套人</th>
                                        <th style="width: 110px">预配套时间</th>

                                    </tr>
                                </ng-template>
                                <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
                                    <tr [ttRow]="rowNode">
                                        <!-- *ngIf="(rowNode.node.children&&rowNode.node.children.length !=0)||rowNode.node.children==null" -->
                                        <td style="width: 150px;position:sticky;left:0;z-index:1;" *ngIf="rowData.nodeLevel ==10">
                                            <div class="btn-group dropdown" dropdown container="body">
                                                <button dropdownToggle class="dropdown-toggle btn btn-sm btn-primary">
                                                    <i class="fa fa-cog"></i><span class="caret"></span> 操作
                                                </button>
                                                <ul class="dropdown-menu" *dropdownMenu>
                                                    <li>
                                                        <a *ngIf="'Pages.PhysicalMatching.Resume' | permission" href="javascript:;" (click)="llVisibleEv(rowData.id)">履历</a>
                                                    </li>
                                                    <li>
                                                        <a *ngIf="'Pages.PhysicalMatching.ManualMatching' | permission" href="javascript:;"
                                                            (click)="getExecutePreSuitePersonEv(rowNode,'人工配套')">人工配套</a>
                                                    </li>
                                                    <li>
                                                        <a *ngIf="'Pages.PhysicalMatching.See' | permission" href="javascript:;"
                                                            (click)="getExecutePreSuitePersonEv(rowNode,'查看')">查看</a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </td>
                                        <td style="width: 150px;position:sticky;left:0;z-index:1;" *ngIf="rowData.nodeLevel !=10">
                                        </td>
                                        <td style="width: 80px;position:sticky;left:150px;z-index:1;">
                                            <p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
                                            {{rowData.levelName}}
                                        </td>
                                        <td style="width: 80px;position:sticky;left:230px;z-index:1;">
                                            <p-treeTableCheckbox [value]="rowNode">
                                            </p-treeTableCheckbox>
                                            <!-- [disabled]="rowNode.node.nodeLevel == 9 && rowNode.node.children&&rowNode.node.children.length ==0" -->


                                        </td>
                                        <td style="width: 110px;position:sticky;left:310px;z-index:1;">{{rowData.code}}</td>
                                        <td style="width: 110px;position:sticky;left:420px;z-index:1;">{{rowData.name}}</td>
                                        <td style="width: 110px">{{rowData.module}}</td>
                                        <td style="width: 110px">{{rowData.joinText}}</td>
                                        <td style="width: 110px">{{rowData.materialsNodeName}}</td>
                                        <td style="width: 110px">{{rowData.yearsNo}}</td>
                                        <td style="width: 110px">{{rowData.unit}}</td>
                                        <td style="width: 110px">{{rowData.number}}</td>
                                        <td style="width: 130px">{{rowData.preSuiteStock}}</td>
                                        <!-- <td style="width: 130px">{{rowData.usableQuantityStock}}</td> -->
                                        <!-- 2021-10-05曲冰修改 -->
                                        <td style="width: 130px">{{rowData.usableMatingQuantityStock}}</td>
                                        <td style="width: 110px">{{rowData.suiteStock}}</td>
                                        <td style="width: 110px">{{rowData.starvingStock}}</td>
                                        <td style="width: 110px">{{rowData.deliveryStock}}</td>
                                        <td style="width: 110px">{{rowData.matingStatusName}}</td>
                                        <td style="width: 110px">{{rowData.completePeople}}</td>
                                        <td style="width: 110px">{{rowData.completeTime|date:'yyyy-MM-dd'}}</td>
                                        <td style="width: 110px">{{rowData.preSuiteName}}</td>
                                        <td style="width: 110px">{{rowData.preSuiteTime|date:'yyyy-MM-dd'}}</td>

                                    </tr>
                                </ng-template>
                            </p-treeTable>

                            <!-- <div class="primeng-paging-container">
                    <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                      [totalRecords]="primengTableHelper.totalRecordsCount" (onPageChange)="getNodePlanDetails($event)"
                      [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">
                    </p-paginator>
                    <span class="total-records-count">
                      {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                    </span>
                  </div> -->
                        </div>
                    </div>
                </div>
                <div class="content-text">芯级路线</div>
                <div style="height: 225px;">

                    <!-- <p-organizationChart [value]="data2"></p-organizationChart> -->
                    <div id="myDiagramDiv" style="width:100%;height:100%;"></div>
                </div>

            </div>
        </div>



        <!--  修改  弹窗 -->
        <p-dialog [style]="{width: '80%', height: '50%',background:'#fff'}" [(header)]="dialogType"
            [(visible)]="addVisible" (onHide)="displayclose()" modal="modal" [responsive]="true">
            <form #addForm="ngForm" (ngSubmit)="upatePlanEv()" novalidate class="add-form" autocomplete="off">
                <div class="ui-g form-info" *ngIf="selectedFiles1">
                    <div class="p-field ml ui-g-6">
                        <span class="input-lable" style="margin-right: 5px;">*计划开始日期：</span>
                        <p-calendar name="startTime" #startTimeSelect="ngModel" [(ngModel)]="addInfoUi.startTime">
                        </p-calendar>
                        <validation-messages [formCtrl]="startTimeSelect"></validation-messages>

                    </div>
                    <div class="p-field ml ui-g-6">
                        <span class="input-lable" style="margin-right: 5px;">*计划完成日期：</span>
                        <p-calendar name="endTime" #endTimeSelect="ngModel" [(ngModel)]="addInfoUi.endTime">
                        </p-calendar>
                        <validation-messages [formCtrl]="endTimeSelect"></validation-messages>
                    </div>
                    <div class="p-field ml ui-g-12">
                        <span style="margin-right: 5px;">*是否同步更新后续路线计划：</span>
                        <!-- <p-calendar name="dropList" #dropListSelect="ngModel" [(ngModel)]="date2"></p-calendar>
                <validation-messages [formCtrl]="dropListSelect"></validation-messages> -->

                        <p-radioButton name="group1" value="1" label="是" [(ngModel)]="addInfoUi.renovateFlag"
                            inputId="opt1">
                        </p-radioButton>
                        <p-radioButton name="group1" value="0" label="否" [(ngModel)]="addInfoUi.renovateFlag"
                            inputId="opt2">
                        </p-radioButton>

                    </div>
                    <div class="p-field ml ui-g-6" *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                        <span class="input-lable" style="margin-right: 5px;">*装配班组：</span>
                        <!-- <p-calendar name="startTime" #startTimeSelect="ngModel" [(ngModel)]="handelInfo.organizationUnitId"></p-calendar> -->
                        <p-multiSelect (onChange)="unitChangeEv($event.value)" [options]="getOrganizationUnitList"
                            name="organizationUnitId" #organizationUnitIdSelect="ngModel"
                            [(ngModel)]="addInfoUi.organizationUnitId" defaultLabel="请选择" required
                            optionLabel="displayName" dataKey="id"></p-multiSelect>
                        <validation-messages [formCtrl]="organizationUnitIdSelect"></validation-messages>

                    </div>
                    <div class="p-field ml ui-g-6" *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                        <span class="input-lable" style="margin-right: 5px;">*装配人员：</span>
                        <p-multiSelect [options]="getOrganizationUnitUsersByIdList" name="userId"
                            #userIdSelect="ngModel" [(ngModel)]="addInfoUi.userId" defaultLabel="请选择" required
                            [optionLabel]="name" dataKey="id">
                        </p-multiSelect>
                        <validation-messages [formCtrl]="userIdSelect"></validation-messages>

                    </div>
                    <div class="p-field ml ui-g-6" *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                        <span class="input-lable" style="margin-right: 5px;">*标准工时H：</span>
                        <input id="input" type="text" readonly name="performanceHour" #performanceHourInput="ngModel"
                            pInputText [(ngModel)]="addInfoUi.performanceHour">


                    </div>
                    <div class="p-field ml ui-g-6" *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                        <span class="input-lable" style="margin-right: 5px;">*绩效工时H：</span>
                        <input id="input" type="text" name="performanceHour" #performanceHourInput="ngModel" pInputText
                            [(ngModel)]="addInfoUi.performanceHour">
                        <validation-messages [formCtrl]="performanceHourInput"></validation-messages>

                    </div>
                    <div class="p-field ml ui-g-12">
                        <span class="input-lable" style="margin-right: 5px;">*备注：</span>
                        <textarea style="width: 70%;" rows="5" name="remark" #remarkInput="ngModel"
                            [(ngModel)]="addInfoUi.remark" pInputTextarea autoResize="autoResize"></textarea>
                        <validation-messages [formCtrl]="remarkInput"></validation-messages>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary" [disabled]="!addForm.form.valid"
                        [buttonBusy]="savingAddDia" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                        <span>提交</span></button>
                </div>
            </form>
        </p-dialog>
        <!-- 履历弹窗 -->
        <p-dialog [style]="{width: '80%', height: '50%',minHeight:'300px',background:'#fff'}" header="操作履历"
            [(visible)]="llVisible" (onHide)="displayclose()" modal="modal" [responsive]="true">
            <p-table [value]="logList" [paginator]="false">
                <ng-template pTemplate="header">
                    <tr>
                        <th style="width: 150px">序号</th>
                        <th style="width: 150px">操作时间</th>
                        <th style="width: 150px">操作类型</th>
                        <th style="width: 150px">操作人</th>
                        <th style="width: 150px">操作详情</th>
                    </tr>
                </ng-template>
                <ng-template pTemplate="body" let-rowIndex="rowIndex" let-car>
                    <tr>
                        <td style="width: 80px">{{rowIndex+1}}</td>
                        <td style="width: 150px">{{car.creationTime | date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.operationTypeDesc}}</td>
                        <td style="width: 150px">{{car.userName}}</td>
                        <td style="width: 150px">{{car.businessTypeDesc}}</td>
                    </tr>
                </ng-template>
            </p-table>


        </p-dialog>
        <!-- 默认排配计划  -->
        <p-dialog [style]="{width: '50%', height: '60%',background:'#fff'}" [(header)]="dialogType"
            [(visible)]="defaultVisible" (onHide)="displayclose()" modal="modal" [responsive]="true">
            <form #defaultForm="ngForm" novalidate class="add-form" autocomplete="off">
                <div class="ui-g form-info">
                    <div *ngIf="dialogType=='默认排配计划'">
                        <div class="p-field ml ui-g-6">
                            <span class="input-lable" style="margin-right: 5px;">*计划开始日期：</span>
                            <p-calendar name="startTime" #startTimeSelect="ngModel" [(ngModel)]="defaultInfo.startTime">
                            </p-calendar>
                            <validation-messages [formCtrl]="startTimeSelect"></validation-messages>

                        </div>
                        <div class="p-field ml ui-g-6">
                            <span class="input-lable" style="margin-right: 5px;">*计划完成日期：</span>
                            <p-calendar name="endTime" #endTimeSelect="ngModel" [(ngModel)]="defaultInfo.endTime">
                            </p-calendar>
                            <validation-messages [formCtrl]="endTimeSelect"></validation-messages>

                        </div>
                    </div>

                    <div *ngIf="dialogType=='手动排配计划'">
                        <div class="p-field ml ui-g-6">
                            <span class="input-lable" style="margin-right: 5px;">*计划开始日期：</span>
                            <p-calendar name="startTime" #startTimeSelect="ngModel" [(ngModel)]="handelInfo.startTime">
                            </p-calendar>
                            <validation-messages [formCtrl]="startTimeSelect"></validation-messages>

                        </div>
                        <div class="p-field ml ui-g-6">
                            <span class="input-lable" style="margin-right: 5px;">*计划完成日期：</span>
                            <p-calendar name="endTime" #endTimeSelect="ngModel" [(ngModel)]="handelInfo.endTime">
                            </p-calendar>
                            <validation-messages [formCtrl]="endTimeSelect"></validation-messages>

                        </div>
                        <div class="p-field ml ui-g-6"
                            *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                            <span class="input-lable" style="margin-right: 5px;">*装配班组：</span>
                            <!-- <p-calendar name="startTime" #startTimeSelect="ngModel" [(ngModel)]="handelInfo.organizationUnitId"></p-calendar> -->
                            <p-multiSelect (onChange)="unitChangeEv($event.value)" [options]="getOrganizationUnitList"
                                name="organizationUnitId" #organizationUnitIdSelect="ngModel"
                                [(ngModel)]="handelInfo.organizationUnitId" defaultLabel="请选择" required
                                optionLabel="displayName" dataKey="id"></p-multiSelect>
                            <validation-messages [formCtrl]="organizationUnitIdSelect"></validation-messages>

                        </div>
                        <div class="p-field ml ui-g-6"
                            *ngIf="selectedFiles1.nodeLevel===8 ||selectedFiles1.isRelation==1">
                            <span class="input-lable" style="margin-right: 5px;">*装配人员：</span>
                            <p-multiSelect [options]="getOrganizationUnitUsersByIdList" name="userId"
                                #userIdSelect="ngModel" [(ngModel)]="handelInfo.userId" defaultLabel="请选择" required
                                [optionLabel]="name" dataKey="id">
                            </p-multiSelect>
                            <validation-messages [formCtrl]="userIdSelect"></validation-messages>

                        </div>
                        <div class="p-field ml ui-g-12">
                            <span class="input-lable" style="margin-right: 5px;">*备注：</span>
                            <textarea style="width: 70%;" rows="5" name="definition" #definitionInput="ngModel"
                                [(ngModel)]="handelInfo.remark" pInputTextarea autoResize="autoResize"></textarea>
                            <validation-messages [formCtrl]="definitionInput"></validation-messages>
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button *ngIf="dialogType=='默认排配计划'" type="submit" class="btn btn-primary"
                        [disabled]="!defaultForm.form.valid" [buttonBusy]="savingAddDia"
                        [busyText]="l('SavingWithThreeDot')" (click)="getDefaultArrangement()"><i
                            class="fa fa-save"></i>
                        <span>提交</span></button>
                    <button *ngIf="dialogType=='手动排配计划'" type="submit" class="btn btn-primary"
                        [disabled]="!defaultForm.form.valid" [buttonBusy]="savingAddDia"
                        [busyText]="l('SavingWithThreeDot')" (click)="handManage()"><i class="fa fa-save"></i>
                        <span>提交</span></button>
                </div>
            </form>
        </p-dialog>
        <!-- 缺料 -->
        <p-dialog [style]="{width: '70%', height: '50%',minHeight:'300px',background:'#fff'}" header="缺料表"
            [(visible)]="shortageVisible" (onHide)="displayclose()" modal="modal" [responsive]="true">
            <p-table [style]="{minHeight:'300px'}" [value]="logList" [paginator]="false">
                <ng-template pTemplate="header">
                    <tr>
                        <th style="width: 150px">序号</th>
                        <th style="width: 150px">物料图号</th>
                        <th style="width: 150px">物料名称</th>
                        <th style="width: 150px">规格</th>
                        <th style="width: 150px">物料类型</th>
                        <th style="width: 150px">单位</th>
                        <th style="width: 150px">缺料数量</th>
                        <th style="width: 150px">备注</th>
                    </tr>
                </ng-template>
                <ng-template pTemplate="body" let-rowIndex="rowIndex" let-car>
                    <tr>
                        <td style="width: 80px">{{rowIndex+1}}</td>
                        <td style="width: 150px">{{car.creationTime | date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.operationTypeDesc}}</td>
                        <td style="width: 150px">{{car.userName}}</td>
                        <td style="width: 150px">{{car.businessTypeDesc}}</td>
                        <td style="width: 150px">{{car.businessTypeDesc}}</td>
                        <td style="width: 150px">{{car.businessTypeDesc}}</td>
                        <td style="width: 150px">{{car.businessTypeDesc}}</td>
                    </tr>
                </ng-template>
            </p-table>


        </p-dialog>
        <!-- 人工配套  查看-->
        <p-dialog [style]="{width: '70%', height: '50%',background:' #fff'}" [(header)]="dialogType"
            [(visible)]="detailVisible" (onHide)="displayclose()" modal="modal" [responsive]="true">

            <div *ngIf="detailInfo.info">
                <span class="ui-float-label  quality-dept ui-g-3">
                    <span class="text">产品图号：</span>
                    <input id="input" disabled placeholder="请输入产品图号" type="text" pInputText
                        [(ngModel)]="detailInfo.info.node.data.code">

                </span>
                <span class="ui-float-label  quality-dept ui-g-3">
                    <span class="text">产品名称：</span>
                    <input id="input" disabled placeholder="请输入产品名称" type="text" pInputText
                        [(ngModel)]="detailInfo.info.node.data.name">
                </span>
                <span class="ui-float-label  quality-dept ui-g-3">
                    <span class="text">工艺用量：</span>
                    <input id="input" disabled placeholder="请输入工艺用量" type="text" pInputText
                        [(ngModel)]="detailInfo.info.node.data.number">
                </span>
                <span class="ui-float-label  quality-dept ui-g-3">
                    <span class="text">配套数量：</span>
                    <input id="input" disabled placeholder="请输入配套数量" type="text" pInputText
                        [(ngModel)]="detailInfo.info.node.data.suiteStock">
                </span>

            </div>
            <p-table [value]="detailInfo.list" [scrollable]="true" scrollHeight="300px" [(selection)]="rengongSelect"
                [paginator]="false">
                <ng-template pTemplate="header">
                    <tr>
                        <th style="width: 80px;position:sticky;left:0;z-index:1;">
                            <!-- <p-tableHeaderCheckbox></p-tableHeaderCheckbox> -->
                            选择
                        </th>
                        <th style="width: 80px;position:sticky;left:80px;z-index:1;">序号</th>

                        <th style="width: 150px;position:sticky;left:160px;z-index:1;">产品图号</th>
                        <th style="width: 150px;position:sticky;left:310px;z-index:1;">产品名称</th>
                        <th style="width: 150px">规格型号</th>
                        <th style="width: 150px">物料类别</th>
                        <th style="width: 150px">物料细类</th>
                        <th style="width: 150px">物料属性</th>
                        <th style="width: 150px">年代号</th>
                        <th style="width: 150px">装配任务号</th>
                        <th style="width: 150px">有效期止</th>
                        <th style="width: 150px">合格证号</th>
                        <th style="width: 150px">放行单号</th>
                        <th style="width: 150px">数量</th>
                        <th style="width: 150px">产品编号(件号)</th>
                        <th style="width: 150px">型号(产品代号)</th>
                        <th style="width: 150px">发次</th>
                        <th style="width: 150px">批次</th>
                        <th style="width: 150px">特殊记载</th>
                        <th style="width: 150px">仓库名称</th>
                        <th style="width: 150px">储位</th>
                        <th style="width: 150px">预配套人</th>
                        <th style="width: 150px">预配套时间</th>
                        <th style="width: 150px">配套人</th>
                        <th style="width: 150px">配套时间</th>
                        <th style="width: 150px">配套状态</th>
                        <th style="width: 150px">质控卡号</th>
                        <th style="width: 150px">合格证任务号</th>
                        <th style="width: 150px">入库人</th>
                        <th style="width: 150px">入库时间</th>
                        <th style="width: 150px">备注</th>
                        <th style="width: 150px">确认人</th>
                        <th style="width: 150px">确认时间</th>
                    </tr>
                </ng-template>
                <ng-template pTemplate="body" let-rowIndex="rowIndex" let-car>
                    <tr>
                        <td style="width: 80px;position:sticky;left:0;z-index:1;">
                            <p-tableCheckbox
                                [disabled]="car.materialsProperty==2||car.suitStuts=='已配套' || dialogType=='查看' || car.materialsProperty == 1"
                                [value]="car">
                            </p-tableCheckbox>
                        </td>
                        <td style="width: 80px;position:sticky;left:80px;z-index:1;">{{rowIndex+1}}</td>

                        <td style="width: 150px;position:sticky;left:160px;z-index:1;">{{car.productDrawingNo}}</td>
                        <td style="width: 150px;position:sticky;left:310px;z-index:1;">{{car.productName}}</td>
                        <td style="width: 150px">{{car.module}}</td>
                        <td style="width: 150px">{{car.materialsNode}}</td>
                        <td style="width: 150px">{{car.materialCategory}}</td>
                        <td style="width: 150px">{{car.materialsProperty == 0 ? '在库' : car.materialsProperty==1 ?
                            '未领料':'已出库'}}
                        </td>
                        <td style="width: 150px">{{car.years}}</td>
                        <td style="width: 150px">{{car.assemblyTaskNumber}}</td>
                        <td style="width: 150px">{{car.expirationDate |date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.qualifiedNumber}}</td>
                        <td style="width: 150px">{{car.releaseOrder}}</td>
                        <td style="width: 150px">{{car.quantity}}</td>
                        <td style="width: 150px">{{car.productNumber}}</td>
                        <td style="width: 150px">{{car.productCode}}</td>
                        <td style="width: 150px">{{car.sendTime}}</td>
                        <td style="width: 150px">{{car.batch}}</td>
                        <td style="width: 150px">{{car.SpecialRecords}}</td>
                        <td style="width: 150px">{{car.stroeName}}</td>
                        <td style="width: 150px">{{car.binLocation}}</td>
                        <td style="width: 150px">{{car.preSuiteName}}</td>
                        <td style="width: 150px">{{car.preSuiteTime |date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.completePeople}}</td>
                        <td style="width: 150px">{{car.completeTime |date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.suitStuts}}</td>

                        <td style="width: 150px">{{car.qCCardNo}}</td>

                        <td style="width: 150px">{{car.qualifiedTaskNumber}}</td>

                        <td style="width: 150px">{{car.storePutPeople}}</td>
                        <td style="width: 150px">{{car.storePutTime |date:'yyyy-MM-dd'}}</td>
                        <td style="width: 150px">{{car.remark}}</td>
                        <td style="width: 150px">{{car.identifyingPeople}}</td>
                        <td style="width: 150px">{{car.identifyingTime |date:'yyyy-MM-dd'}}</td>
                    </tr>
                </ng-template>
            </p-table>
            <p-footer>
                <p-button label="取消" (click)="detailVisible=false" class="ui-button-secondary query-btn"></p-button>
                <p-button *ngIf="dialogType =='人工配套'" label="配套" (click)="executePreSuitePersonEv()" class="query-btn">
                </p-button>
            </p-footer>

        </p-dialog>

    </div>
</div>